package com.tt.controller;


import com.tt.entity.vo.MovieRankBoxOfficeVO;
import com.tt.service.MovieRankBoxOfficeService;
import org.springframework.web.bind.annotation.GetMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

/**
 * <p>
 * 电影票房排行榜,需要定期更新 前端控制器
 * </p>
 *
 * @author TP
 * @since 2023-03-04 09:14:12
 */
@RestController
public class MovieRankBoxOfficeController {

    private final MovieRankBoxOfficeService movieRankBoxOfficeServiceImpl;

    public MovieRankBoxOfficeController(MovieRankBoxOfficeService movieRankBoxOfficeServiceImpl) {
        this.movieRankBoxOfficeServiceImpl = movieRankBoxOfficeServiceImpl;
    }

    @GetMapping("/rankBoxOffice")
    public ArrayList<ArrayList<MovieRankBoxOfficeVO>> getBoxOffice() {
        return movieRankBoxOfficeServiceImpl.getBoxOffice();
    }
}
